package com.zhaungjie.base.utils;

import java.time.DayOfWeek;
import java.time.LocalDate;

/**
 * 周助手
 *
 * @author zhuangjie
 * @date 2024/03/20
 */
public class WeekHelper {
    /**
     * 获取当前星期几（1-7）
     * @return
     */
    public static int dayOfWeek(){
        DayOfWeek day = LocalDate.now().getDayOfWeek();
        int value = day.getValue();
        if(value == 7) {
            return 1;
        } else {
            return value + 1;
        }
    }
}
